//
//  FirstView.m
//  豆瓣YHY
//
//  Created by dllo on 15/11/3.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "FirstView.h"

@implementation FirstView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self zz];
    }
    return self;
}
- (void)zz{
    //姓名
    self.labelname = [[UILabel alloc]initWithFrame:CGRectMake(20, 70, 80, 40)];
    self.labelname.text = @"用户名";
    [self addSubview:self.labelname];
    
    self.textname = [[UITextField alloc]init];
    self.textname.placeholder = @"请输入";
    self.textname.text = @"";
    self.textname.borderStyle = UITextBorderStyleRoundedRect;
    self.textname.frame = CGRectMake(130, 70, 100, 40);
    [self addSubview:self.textname];
    
    //密码
    self.labelpassword = [[UILabel alloc]initWithFrame:CGRectMake(20, 150, 80, 40)];
    self.labelpassword.text = @"密码";
    [self addSubview:self.labelpassword];
    
    self.textpasswordd = [[UITextField alloc]initWithFrame:CGRectMake(130, 150, 100, 40)];
    self.textpasswordd.borderStyle = UITextBorderStyleRoundedRect;
    self.textpasswordd.placeholder = @"密码";
    [self addSubview:self.textpasswordd];
    
    //登入
    self.buttendengru = [UIButton buttonWithType:UIButtonTypeCustom];
    self.buttendengru.frame = CGRectMake(20, 250, 100, 50);
    [self.buttendengru setTitle:@"登入" forState:UIControlStateNormal];
    self.buttendengru.backgroundColor = [UIColor greenColor];
    [self addSubview:self.buttendengru];
    
    //zhuc
    self.buttonlogin = [UIButton buttonWithType:UIButtonTypeCustom];
    self.buttonlogin.frame = CGRectMake(250,250, 100,50);
    [self.buttonlogin setTitle:@"注册" forState:UIControlStateNormal];
    self.buttonlogin.backgroundColor = [UIColor orangeColor];
    
    [self addSubview:self.buttonlogin];
}
@end
